update widget and fix bug