fixed bad request exception