fix bug which caused snapshot ids to be appended rather than replaced