fixed OutOfMemory for huge imports