Code in example fixed