merge pull request fixing exit 1 on error