Fix check in inArray