Cleaner handling of failure cases #941