Fix autoinstall bugs