Trying to fix race conditions, no real luck yet...