Bones rotate in opposite directions

When in object mode everything seems to be correct

But in pose and object mode some bones are twisted in opposite direction

Is there any way to resolve this bug? May be someone have already had such bad experience and have a solution?
Because i’m stuck with my progress on rigging tutorial because of this.

It seems the only wat to solve it is choose all problem bones in edit mode and Ctrl+N Along Z Axis and then again Ctrl+N Along Y Axis. Then manually rotete bones which need to be rotated in oposite direction