fixed incorrect variable usage