Fixed incorrect variable usage