fix crash caused by null logger