Fix phrase id generation.