removing event handlers on reload