Bug fixes to installation