Fix logic error in example