Ok.. first polyfill was buggy :/ this one seems to work great though