Fixed logger crash null pointer exception.