For #2004: fix modes