Fix incorrect variable use