Modification of the LoopPrimitive class as explained in issue #9