fixing delete action for relations