inarray check bug fix