Added sleep in disconnect