Fixed some bugs in the deploy script. It works!