Fix race condition when read values of relationships