Fixes to use qualified selectors and undefined

Fixes to use qualified selectors and undefined