Fix the graphs functions