Fixed encode error