Fixed SEGV fault crash