Make install script more stable