Bug fixed: check correct record for bulk import