Warlock issue with switching mobs

The switching mobs after X dot is a bit bugged, when I tell it to switch mob after 2 dots, it does exactly that but only for 2 mobs and gets stuck on the 3rd until it dies(keeps trying to use the same dot skill or a third one which isn’t possible).