fixed problem with pagination during pagination manipulation when upload
with option 'uncounted' is used
optimized methods to change docstructs