Removed duplicated relations using set