Bugfix of reconnect