update legacymode handling