fix optional variable order on has_many