Added some fixes to deployment script