Fixed Client termination issue.