fixed code typo in clear connection methods