Bug fixes for "getWidget()" in RenderResult and added test case