fix relation initialization and fix bug with duplicatied values if use with