Add public_id fixes throughout the code