Fixed error printing bug.