Weighted moving average rotator BUG

When i try to move my camera drived by my livelink xr controller and i use weighted moving average rotator blueprint node, there is a gap between -180º and 180º where the maths are incorrect making my camera sping all the way around the opposite direction.
It needs to be fixed, so when the previous and current possitions difference is more than 180º or less than -180º, it needs to add or substract 360º in order to get the proper weigthed rotation.

I wrote about a solution for this over here.