fix encoder errors