fixed a bug i introduced when deleting cards