fixed a bug in update_locations.py