More fixes to error handling