Fixed install and upgrade procedures