added pre-uninstall hook