bug fix for logging