Fixed bugs in setup.sh script: it is tested and validated on AWS EC2