Needed to check index '0' of the array instead of '1'