implement some hacks to make scrolling to buffer end more reliable