fixed bug when editing a location twice