Fixed unit switch bug part2