Fatals

Heimdall crashes in two situations when it is performing error handling procedures. The crashes are fixed by these commits.