Fix sizing bug when document scrolled.