fixed long connection bugs