switch bad usage fixed