added limits to import scripts to prevent crashes of subqueries