trying to fix geometry selection in a robust way