minor improvements
not reconnecting many times if never connected before