Fixed segfault on model load.