bug fix and fix network protocol