added index into $pattern.matches

apparently this would cause powershell v2 to error