fix encodert