Fix incorrect variable assignment