Fixed dialog reseting