Small improvement to the fast encoder.