Corrected edge conditions handling