Fixed bug in map update