fixed NPE in logger