Black boxes positioned incorrectly after capture

Black boxes were positioned incorrectly after screen capture on a page
with scroll, this commit fixes it.