Bug fix to logs