Fix issues in setup script