fix uninstall and improve database move