fixed save function so that characters location on map is saved correctly