Modal switch bug