bugfix: fix occasional reader crash when change screen mode from landscape to portrait in reflow mode 

And code cleanup.