fixed another problem related to types used in switch