Fixing wrong loging behavior.