Fixed possible segfault on contact loading