minor improvements to display/hide functions (not making assumptions anymore)