Improve the support for widgets in the client side