Fixed keyframe weighting calculation

Fixed weighting calculation between keyframes
Loop iterations are now working