fix numpy, EncoderResult errors