fix auto scroll bug