Fixed a bug with set -e