Added support for disconnect