FIX: Corrected undefined variables.