fix dialog script.js