fix status code and error detection