I'm glad you shared in detail the solution .. i was wondering where exactly the problem was
Its takes a little time to tweak it at the beginning (with debug nodes everywhere) but once you fully understand it, the join node is one of the most powerful nodes from the core nodes.