fixed exception printing issue.