Added defensive code to prevent the change dialog showing up more than once