Four years after its release, director Bryan Singer has finally addressed a longstanding plot hole from the end of 2014's X-Men: Days of Future Past.

In the final moments of the film, Wolverine is fished out of the Potomac River by Major William Stryker in 1973. However, not all is as it seems when Stryker's eyes briefly flash yellow, revealing that the bigoted Army officer is actually Mystique in disguise. In an Instagram post, Singer revealed the final twist involving the shape-shifting mutant was a last-minute change in production.

As explained by Singer, Mystique's rescue of Wolverine while disguised as Stryker was a change to underscore the new role of Jennifer Lawrence's character, secretly helping mutants while setting up Logan's brief role in 2016's X-Men: Apocalypse.

RELATED: No, X-Men: Dark Phoenix Hasn’t Been Removed From Fox’s Schedule

Given the twist of Mystique recovering Logan, it came as a surprise to fans when Wolverine was securely back in Stryker's custody in Apocalypse as part of the Weapon X program. The discrepancy created a plot hole as fans wondered how the Canadian mutant ended up back in the top-secret program despite Mystique's surprise intervention.

RELATED: Deadpool 2 Handles Time Travel Better Than X-Men: Days of Future Past

With Singer's explanation, it looks like the entire plot hole came about because of a late-in-game change to the visual effects.

In the meantime, fans can look forward to the next installment of Fox's popular X-Men film series on February 14 when X-Men: Dark Phoenix is scheduled for release.