Fixed an error with creating the graphs.