fixing bug which did not show the graph