Fixed segfaults on some computers