Fixed reconnecting issue