Added reconnection on close