close conenction before opening again