Correcting application.js to enable button close