Cleaning up the viewer and pdfbug; fixes repeats in Stepper
Merge pull request #4519 from yurydelendik/pdfbugclean

Cleaning up the viewer and pdfbug; fixes bugs in Stepper