fix array check.