Fix exception handling
Merge commit '3979a90'