Fixed: Additional undos were generated when making an invalid move