seems like a stack overflow issue... changed some stuff to fix that