fixing a weird bug where images would flicker on first scroll