You might be adding stitches which will throw off the pattern, or you might have a stitch number which isn't divisible by 4. You can do a number that's divisible by 4 plus 2 (like 18 or 26) but you can't begin every row with k2 p2. If you knit the stitches on the needle that look like knits and purl the ones that look like purls, that will keep the ribbing pattern. If neither of these ideas doesn't seem to be the problem, and you can post a picture of your work, we might be able to figure it out.
sue- knitting heretic