Fix problem caused by set -e.