Fix logging errors.