Fixed the re-loading of dlg vars after restart
Credits to Nick Altmann
(cherry picked from commit ec0d05aaef41b0a4f30419bbab1295eb4bce7e49)