fix null result issues