fix scroll_end bug