Check order of variables dict

Didn't read the comment when I modified this before.