fix a logging flaw