You /always/ should refresh() your scroller after loading the content. Setting a timeout is the proper way to permit the DOM some time to update itself so that the refresh() function can get a good height. If 0ms isn't giving sufficient time (say, a complicated document), try 50, 100, or 150ms.
Depending on where you've put your scroller and how the content is loading, you may actually be nuking the scroller itself. In that case, you'll need to re-create it.