Fixed bug with users ordering query.