fix response code method