Fix widget's bugs.