fixed crash when updating database, added new cards