fixed corner cases on deploy.sh