fix NPE.