Fixing the log related bugs