Fixed Logging Bug