fix error with undefined atrtibute on line #77