Fixing the turnto command to check the right variables