Make sure we fail if build fails.
Merge pull request #1617 from obino/small-fixes

Make sure we fail if build fails.