Improve some operator functions
fix packet encoding from 89322cbe8ee6414d4a668e6b957cc70d35d5a2bd