fixed the logger null bug