fix a SEGV issue