disconnect and bug fixes