Fix bug with javascript that conflicts with Turbolinks