Trying to fix toggle of modes