Unable to make the widget work