'switch' bug fix: have to get actual value of expression