switch to call fixes

can't compare two variables of different types with if