fix refactoring mistake where modelAttr/observe might not be defined