Fixes onReady to make it work with turbolinks