fixes issues found in integration testing
reference & vendor can be set automatically from lead & source data