Modification of the LoopPrimitive class

Should resolve the issue #9