fixes to accept polymorphic relationship #288