fixed a major bug in select_by_array (helper.rb)