fix bugs in deploy.rb