fix switch bug;