Remove handler on unload