Bug fixes in map