Make location order consistent