bug fix in map handler