close connection
fix when sync with the server