correcting some mistake in map.cpp