fixing bug in example