segfault at the bottom of tree insert, gdb shows (node*) is 0x0, try stopping in previous iteration