It is possible for male termites to engage in homosexual pairings with other male termites, especially if there are no female termites around, a new study reveals.

An article posted in Live Science reported that scientists previously thought that homosexual pairing is just a case of misrecognition in insects, just like male termites acting like female termites. However, this is actually not the case. In fact, the study reveals that it is possible that same-sex pairs (male-to-male mating) can actually produce an offspring through colony fusion.

Lead researcher Nobuaki Mizumoto used Japanese male termites and closely observed their behavior as they build nests. He found out that a homosexual pair invades a nest of a heterosexual pair by defeating the male termite from the heterosexual pair. After which, one of the male termites from the same-sex pair can mate with the female from the heterosexual pair.

"Japanese termites usually make nests in monogamous, heterosexual pairs," Mizumoto said. "In theory, misrecognizing a female for a male in a monogamous mating system should incur considerable costs for reproduction. There had to be some sort of benefit if this were a common behavior."

A study published in Science Direct  mentions that termites in male-to-male pairing have higher chances of survival. "It's clear that male-male pairing is a strategy for survival," Mizumoto said.

And what is quite interesting is that, there are actually a lot of animals in the world that can alter their genders or even change back to their original gender. It gets a bit confusing, but here are other gender-altering animals, as reported in National Geographic:

Cuttlefish  can make any love affair unusual. A male cuttlefish can split in the middle, and he'll alter his gender depending on his company. For example, when with a female and a rival male, a male cuttlefish will alter itself by splitting its first half as male and the other half as female. By appearing as a female, he can attract the rival, dodging him away while successfully hogging the attention of the real female.

Spotted Hyenas are even more different. In their world, females are more dominant. Their clitoris can be enlarged and can have erection, making it a pseudo penis. Of course, they still undergo mating, urinating and even giving birth. Females can also be masculine in behavior.

Hawkfish  in the wild is probably the best because they go to the best of both worlds: they can actually be originally a male, turn into a female and then go back to being a male. They actually undergo what you call "bi-directional" sex change.