When creating a diagonal line you will need more length than when knitting a vertical line. This can change the shape of a garment. You can solve this problem by knitting the first or last stitch twice. Just leave the knitted stitch on the right needle and knit it again. It creates a small chain and will give you that little extra distance.