added conditional display for widgets