Changed the way relation is saved in relations API