some fixes for localstorage and scrolling