Fix for Issue #11: Clean up events on hide