Clean-up, make sure connection is closed in resubmit