fucking fuck you javascript. fixes #614