Merge "Fixe the problem of invalid switch preference" into tm-dev