Fix Modify button

Press "Modify" button second time will cause an error