Corrected handling of mode change