fixed the javascript in application.js that kills the alert box
merging