Fixed sample code errors.