fix null array issue