Fixed problem with exceptions not being caught across library boundaries