fixing statusCode error