Fix error in isOrderByReverse