Character's Feet Rotated Weirdly

It was all fine and dandy until updating to Unity 5, then the model’s feet were rotated weird.

Here is what it’s supposed to look like (The IK foot bone rotation also rotates the foot):

check feet bones’ roll. If it is not equal to zero - it may cause such issies.
but I’ve had thees in Unity 4.6 too…