fix switch compile error