Changes related to segfault (probably negligible)