logging bug fix