various fixes to the deploy script