fixed a coffeescript line to javascript