Fixing null pointer dereference in case XOR was freed up

Thanks to Martin Maurer for reporting this!

Fixes #145