Fix bug introduced by refactoring coffeescript