Tag detection updated to deal with both forms of id