disconnection problem fix and some code refit