Fix segfault in exceptions with xml
Fix invalid dereference