Fixed Nested Repeats

Nested repeats were broken, fixed them, added detailed logging