fixed bug with data ordering on graphs