05/26/2014 04:08 EDT | Updated 05/27/2014 02:59 EDT

Justin Bieber Donates $545,000 To AIDS Research While Partying Cannes

Justin Bieber's latest incident over the weekend set him back over half a million dollars. But for the first time in a while it was a good thing.

TMZ reports the singer was in Cannes over the weekend when he appeared at the amfAR gala and turned heads with one act. Several big names in Hollywood -- Sharon Stone, Leonardo DiCaprio and John Travolta among others -- were there when a gentleman pledged $545,000 towards AIDS research. On hearing the amount Bieber reportedly matched the amount, leaving several people stunned at such a generous gesture.

Bieber, who matched the amount without any hesitation, was asked if he was serious and replied he was. The singer said he just felt like doing something good. Later, Bieber tweeted about amfAR without mentioning the donation while amfAR also praised the singer:

The Wrap reports the gala took place in Antibes (about 30 minutes from Cannes) and raised approximately $35,000,000. The top amount was a wooly mammoth skeleton which artist Damien Hirst dipped in gold. The bid for that item was $15,000,000. Performances by Robin Thicke and Lana Del Rey also took place during the event.

But lest we forget about Bieber's bad boy tendencies, he has a court appearance in Toronto today, May 26, stemming from the incident last December where he allegedly assaulted a limo driver in Toronto.

As reported by CTV News, Bieber won't be in attendance for the appearance but a lawyer representing the singer will. Bieber faces an assault charge from the Dec. 30 incident.

Also on HuffPost

Photo gallery Justin Bieber: Child Star To Bad Boy See Gallery