This should be in a finally block so it gets disonnected even if it fails