fixed bug of removing widget