Fix cases where an exception could be swallowed