simple ast fix, and switch testcases