fix index auto scroll script bug