fix to use correct switch