Fixed bug for widget refreshing