Fixed race condition on graphs and data