fixed exception handling issue.