Fixing the ordering of results