revert the sample's gid to the original and add sample to aid