Try to fix bug when populating db.