fix subtle switch bug