fixed bug in map.js