fixed inArray check