fix long connection bug