Fix incorrect variable order