fix widget preview when layout has gone