Fix upgrade and InstallHandler