Hopefully fixed javascript bug, due to haml -> erb conversion