bug fix and logging