Fixed message logging error