Correct measurements at edges