fixed bug in updateMap, now returns if receives null