Possible source of segfault