More fixes to application.js