Facebook’s “On This Day” feature launched in March and ever since has been offering users the chance to see what they were doing on particular days in years gone by.

While for the most part the feature works out well for users, providing them with happy memories of a life lived to the full, On This Day can occasionally chuck out incidents and accidents long forgotten, from failed relationships, to former friends you thought you’d seen the back of, to sad or tragic events that you’d rather reflect upon when you want to reflect on them, not when Facebook presents them to you unexpectedly.

Well, the good news is that you can now filter out your worst Facebook memories from On This Day thanks to a new feature that should in theory lead to far fewer unpleasant surprises.

The two filters, which can be found by visiting the On This Day page via desktop, offer users the chance to exclude certain names and dates from the feature.

Speaking to ABC News about the new filters, a Facebook spokesperson said it was aware that people like to share a range of meaningful moments on its service, “from celebrating good times like a birthday to getting support in tough times like the passing of a friend or relative,” adding, “As a result, everyone has various kinds of memories that can be surfaced – good, bad and everything in between….We’ve added these filters to give them more control over the memories they see.”

Reports of users stumbling upon difficult moments from their past via On This Day began appearing within days of the service going live earlier this year.

And it’s not the first time the social networking company has had to deal with a nostalgia-based blunder. At the end of last year its “Year In Review” feature – an algorithmically generated slideshow pulling together moments from the previous year – came under fire for leaving some users distraught after it surfaced upsetting memories, made all the worse by the fact that it presented them alongside upbeat illustrations.

One Facebook user, Eric Meyer, was presented with an auto-generated Year In Review sequence that included an image of his recently deceased daughter who’d died following a battle with cancer.

Surrounding the photo of Meyer’s young daughter were illustrations of people dancing in a party atmosphere, while at the top it read, “Eric, here’s what your year looked like!”