Polyfill added for dialog