hot fixed super annoying error in ordering of state variables

This took far too long.