Fixed #284: Fixed the `id` field of a new item not correctly generated.