Scrolling and centering now works correctly in all cases I have tested