Bug Fix: Fix bugs when printing logs.