Fixed bug with map updating.