fix array validation