Set correct state variable