A few changes at ID check for DB