Made the previewer scroll properly when needed.