Debugging segfault (prolly dimension issues)