Fix version masking in UUID generation