This should be:

    id = toId(id);