Fixed segfault in debug messages.