fix stupid switch bug