Fixes bug in saving locations