fix mess logging