minor bug fix in map.js