Fix bad map JavaScript.