fixed bug in graph variable