Fixed mistake in map code