Fix ls_switch bug