fixed a bug which generated duplicate ids for tags