Fixed unexpected output bug.