fixing a problem in update_map