fixed NPE.