Getting close to finding segfault