Fixed bug in application.js