js bug switcher