Fix logging errors