fix bug in logger