Fix timing switch bug