fix timing / concurrency issues