fixed race condition causing incorrect IDs to be reported on INSERT
Merge pull request #16 from TorchlightSoftware/race-condition

fixed race condition causing incorrect IDs to be reported on INSERT