alert errors and better handle coffeescript