Commit revised fix for log warning messages.

It seems likely that the original fix was ok, but there were some debugging warning messages left in that were causing trouble.