Remove some code that we could do more efficiently
Fix dialog closing problem, caused by a wrong location prefix