Fixed issue with not checking entire array.