Fixes sort on polymorphic association #421