fixed message logging