fixed unnecesary reconnecting