fix bugs when uninstalling apache