fixed bug when creating log message