fix rendering issues caused by scrolling