Fixed bad if statment causing bad request bug