Improved handling of Custom Widgets