Fixed segfault on dumping