Fix some js for maps (hack)