Bug fixes to show the log correctly