Fixing a dialog error with order of creation.