Fix batch deploy. Fix #611
Merge branch 'hotfix/batch-deploy'