A transgender man earned the right to be listed as the “father” on the birth certificate of the child he carried, the first in the state of Illinois.

When Myles Brady Davis was pregnant, he learned that the state was going to list him as the “mother” of his child on the kid’s birth certificate. To make matters worse, his wife Precious was going to be listed as the “father,” possibly because she is also transgender.

Related: Texas dad talks about his transgender son in this amazing video

“It was so crazy,” Myles told the Chicago Tribune. “I never even thought the birth certificate would have to misgender us in that way.”

Not only is it insulting to misgender the parents on their kid’s birth certificate, it could put them in danger, effectively outing them as transgender whenever they needed the birth certificate.

“It also just removes the choice to decide when or how to disclose their transgender status,” said Kara Ingelhart of Lambda Legal. “That’s private medical and personal information that they should have control over.”

Myles is the communications director for Equality Illinois, so he informed his employer of the birth certificate issue and contacted Lambda Legal. The organization sent a letter on his behalf to the state.

The Illinois Department of Public Health agreed with them, and two weeks after baby Zayn was born, they got a birth certificate that listed Myles as the father and Precious as the mother. It’s the first time a trans man has been listed as the father of the baby he carried on a birth certificate in Illinois.

“I feel so relieved,” said Myles. He and his wife had undergone treatments for fertility and gone off their hormone therapies in order to have a child.

“I’d gone through two years of [IVF] and nine months of a very difficult pregnancy just to be misgendered at the end. It was really breaking my heart.”