Fixed loop in example test