Fixed map resetting bug