fix status code bug