Revert "Revert "Improved detecting change of cards""

This reverts commit 15cbe88d3a7620242208ede7663b3d743acdbf42.