Fix to identify switch type correclty