fix widget closing