Attempt at fixing the race condition #2. Slow down and lock locks.