fixed the response code status check