Use a safer id generation strategy