Fix bug with tagging in library