Fixed incorrect variable reference