Boundary Bug fixed for N