I'll bet I have been there and done that. LOL You need to make certain that you have the yarn in the back when you do the knit stitch and that you take it to the front when you purl. To switch from knit to purl move the yarn the way you need it BETWEEN the needles. IOW With yarn in back, knit one, move the yarn to the front between needles. Purl the next stitch. Now move the yarn to the back between the needles for the next stitch. Knit. Keep moving the yarn back and forth before each change of stitch.