Small bug fix in logging