fixed a bug that crashed scrolling