fixed bug in removing widget