Add missing tests and polyfill