Final fix to the algo, sometimes it wouldn't go for the obvious win.