Fixed an issue with logging