Fix highlight encode error.
Improve connect stability.
Edit merge code