optimize and fix issue about sender and receiver sync