changed order of calls in application.js file