this is almost perfect except sometimes hiding and displaying back the page set width to zero.. how do i recalculate?