Fix for Uncaught TypeError: Cannot read property target of undefined seen on Buttons plugin.