Fixed the code to make it compatible with the new polyfill