application.js bug fix