Encode:fixed a bug