fixed loading segfault