Fixed bug in logger