PS: try slightly harder to determine the desired page size (fixes issue 2420)