Some fixes to setup scripts