Trying to fix unique switch bug