I write my own, but in production I always use libraries written by some dude from Omaha :)
And that dude is no longer actively maintaining it and you just discovered an issue with it.