Pull in exception fixes

Hopefully this will make the merge easier later.