Get rid of SQL errors due to missing ID list