fixed bad request bug