add better reconnection check to be able to reconnect even if connection lost before making the first move