fix null-pointer