Fixed some issues with flipping cards