Fix Javascripts loading in application