fix statusCode check on removeImage code