set the correct mode state