Fix issues in autodeploy script after testing it.