Make location stack work better.