fixed bug in logger