Check for presence of toolbar and pagebar when checking whether they're hidden - otherwise they'll never be shown.