Ryan Lochte may have gotten out of Rio de Janeiro just in time on Wednesday and avoided a thorough police investigation into the report he filed on Sunday after he claimed he was robbed at gunpoint during a night out, but the three teammates who were with him at the time of the alleged robbery weren’t so lucky. U.S. swimmers Jimmy Feigen, Gunnar Bentz, and Jack Conger were all forced to stay in Rio longer than they expected to and questioned by police on Thursday. And at the end of it all, Lochte and Feigen were reportedly charged with false reporting of a crime, which could potentially keep Feigen in Brazil even longer.

It sounds like he’s willing to do just about anything to get out, though, and according to an ABC News report, Feigen’s lawyer has apparently worked out a deal that will allow Feigen to return to the U.S. in exchange for an $11,000 donation to a Brazilian charity called Reaction Institute that was established by Olympic medalist Flavio Canto in 2003. It uses judo to promote the development and social inclusion of children, and it’s the same organization Ronda Rousey donated $30,000 to in early 2015:

ABC News is reporting that Feigen’s lawyer, a judge, and several Brazilian police officials met late Thursday night and hammered out the details of the agreement, which will allow Feigen to leave Brazil as soon as he makes his $11,000 donation. Bentz and Conger were already allowed to leave the country after speaking with police in Rio on Thursday afternoon.

No word yet on what Brazilian police plan to do with regards to Lochte, but his teammates sound like they’re all ready to put this situation behind them as soon as possible.