Fix widget object lookup for newly-created widgets

Eliminate warning related