fix transport: codec improvement, some other stuffs