moved a variable

had a variable in the wrong spot, moved it to where it should be.