fix response code validation