 			if decks[deck.playerClass] == nil {
 				decks[deck.playerClass] = [Deck]()
 			}
+			RealmHelper.validateCardCounts(deck)
 			decks[deck.playerClass]?.append(deck)
 		}
 		return decks

			return nil
		}
		
		return realm.objects(Deck.self).filter("deckId = '\(id)'").first
	}
	
	static func set(hsDeckId: Int64, for deckId: String) {

            Log.error?.message("Error accessing Realm database")
            return nil
        }
		
		let decks = Array(realm.objects(Deck.self))
		
		for deck in decks {
			RealmHelper.validateCardCounts(deck)
		}
		return decks
    }
	
	static func getActiveDecks() -> [CardClass: [Deck]]? {
