fix relationsToArray

The relationsToArray needs to unset it's relation value at the end of
every loop.