Hopefully fixed reconnection bug