Fixed bug with map resets