Fixed an issue with logging crashing.