changed to unique name and unlocking when canceling from the modal