When you go back and forth, make sure to knit the knits and purl the purls. If it looks like a knit, knit it; if it looks like a purl, purl it. My guess is that you're trying to do it the same as in the round and that won't work.
Cheating is an option. . . . Cheaters never win and winners never cheat, but smart knitters who want to retain an iota of sanity do, cheerfully. ~~Kory Stamper