nil issue fix, only a segfault needs to be sorted