Fixed issue where generic relation was not being added in some cases