fixed the bug that was not flipping cards