fixed automatic logging