fixed NPE for empty log