Added dialog scanning, not ideal, need rework.