bugfixes from scrollchanges

Improvements and bugfix associated with the scroll change.
Forgot to commit a week ago, rebased to latest development