It turns out that even dogs can get a little confused. A Jack Russell terrier named Molly underwent gender reassignment surgery after the dog's owners realized she had both male and female organs.

According to a report from Metro, 18-month-old Molly was initially believed to be female. Over time, her owners Mary and Frank Finlay from Glasgow observed that she was acting oddly and displaying typically male behavior including lifting her leg to pee. Concerned, the couple took her to the veterinary where it was discovered that Molly has an ovary, but also testes and a small appendage.

"We got Molly in November 2015 and noticed that around the house she would squat to do her pees but outside she would lift her leg," Frank told BBC Scotland a report from Telegraph said. "I mentioned this early on in 2016 to one of Ross's colleagues and they came up with the probability that she was a hermaphrodite, both sexes."

To relieve her discomfort, the owners and veterinarians decided to operate, performing a rare gender reassignment on the pup. It was a rare event and marked the second time such a procedure was performed in Scotland in the past decade.

According to a report from the Telegraph, Ross Allan discovered that Molly's internal sexual organs were male during the procedure. The surgery included removing her pseudo male sexual organ, then making a functional urethral opening in the place of female genitalia.

The surgery took place last June and Molly is completely recovered. Frank revealed that they considered changing her name to Olly to adjust her being biologically male now, but eventually the family decided not to.

"We've seen no change in her behaviour," Mary said. "She's still the same wee Molly and we wouldn't be without her, she's too precious."