memory leak in map implementation fixed