Fixed logging related bug