Order by functionality fixed for Query.