Fixes to setup script