fix encode error in server