fixed switch compile error.