Fix bugs with install and instance