Fix type error in chapter-7