fix switch order