Fixed incorrect numerical index match and fixed test to check for exact expected array length