Character rotating into ground on specific animation

Here is a link to a video with the problem:

it only happens on specific animations, when walking on any direction:

the skeleton was retargeted to the base skeleton, every animation works except those from the 2d blendspace