Fixed some miss file and NPE.