Same as previous commit. Use -1 as invalid id, not 1.