fix bugs in AppWidgets