Fixed turbolinks issue that caused some buttons to not work under certain conditions