fix history scroll bug