fix null pointr