fix the type for encoder field