fixed a status code bug in delete