make the popup editing work properly.