Fix error printing issue.