fix scrolltop on state changes