fixed set -e invocation