Fixes cleaning up of the rendered pages
Merge pull request #3943 from yurydelendik/issue-3942

Fixes cleaning up of the rendered pages