fix a bug related to delete widget