Remove useless code in widget.php