Fix toolbars and docks remain visible when returning from viewer bug part 2