It's interesting how often rewriting functions to use best practices results in mysterious bugs disappearing. It's a good sign they're wise.