Improve scroll detection