Yes you are right, I guess I didn't notice the bug because I was always passing an even number of plies.

Thanks bud!