fix race condition with hideous loop