Fixed race conditions with loading json data