Remove debug.
Don't make stupid SQL with empty IN clauses.