Dialog close fix