fix data NULL to zero for SEGV