I tested my fix, and it works. If you wish to propose an alternate change, I'll try it out and amend the PR if it passes.