fixes in logging code