Fixed element name bug.
Fixed problem with infinite loop made by relation.