fix crash with mode button