issue #41, #44 and fix map