Fixed! I put a return little to early in the inner loop. Now it works!