Fixed dialog on page reload