fixed bug wrong loop length over multiple parents