Jakub Voracek felt so bad about Philadelphia Flyers fans losing their lids in vain, he ponied up for almost 400 new hats.

During the first period of the Flyers' win against the Colorado Avalanche on Feb. 28, Wayne Simmonds scored two goals and appeared to score a third. So as is custom, fans threw their hats onto the ice to celebrate the hat trick. Except it was actually Voracek who scored the goal.

After Voracek took a little ribbing from the crowd, he promised to buy the number of hats that were thrown on the ice and donate them to charity.

The 396 hats that Voracek bought are going to patients at Children's Hospital of Philadelphia, St. Christopher's Hospital for Children, and Shriners Hospitals for Children.

Tweet from @NHLFlyers: Remember @simmonds17's almost hat trick? @jachobe has bought 396 hats to donate to local children's hospitals, one for every hat thrown. pic.twitter.com/PVmTzTauLU

Hats off to Voracek for the kind gesture.