Fix critical bug in example