Fix a bug where Id wasn't being set properly