fixed some issues for auto scroll