fix jumpy end-of-buffer