Fix rails 4 turbolinks js related bug