Corrected old variable names in error message