Character poles are distorting mesh


Ive made a character which is rigged and skinned and I need to move the poles so that the legs bend correctly but when I move them them the mesh twists too much and gets distorted. Im unsure why. The tutorial that I followed iit doesnt happen with his. Please see pics of before and after .