fixed typo in arm test script
fixed a few more bugs after adding 'set -e'