FIX: Fixed recursive loop error with encoding variable.