Fixed an erro in the error generation method and the graphing method