fixing scoping issue in auto-deploy