fixed macro issue in relationship