fix turbolinks bug with javascripts