Oh sorry, I have misread your comment - I thought you were suggesting two separate solutions. I will update the pull request accordingly.