wrap: fix tests
ldap: cast index as number
download: fix tests