fix bug in example 5