fixed incorrect variable reference