Fix iteration and localization errors
Add a conditional point set using new api