Further attempt to remove race conditions