Fixed locations.

Fixes the case where a location is added and removed in one go before saving.