Use a locking seed

Fixes race conditions.