Hi guys, just a little parity problem...

sometimes in solving octagonal barrel or 4x4x4 cube you can find parity problems, i.e. 2 swapped corners or edges...is there a speedy method to solve this problems? I tried to use different alghoritms, but they works bad, so could someone help me?
Thanks, Fabio.