I'll land this in another pull request as I have to take a closer look at what is going on here.