Fixed bug in case an expression is used in ORDER_BY