Added performance fixes to widget.