chart mode switch bug fix