fixes many to one nesting bug and adds another test