avoid array with only one value
update index controller