fix has_many association, cleanup