Added var to check if the map is changing.