fixed a bug with locations