hide/show controls correctly