Fix some bugs and add a flip back animation for the cards