fixed javascript error on application.html.erb