Fix incorrect variable usage