Fix for duplicate ids