Fixing incorrect variable assignment.