Thanks @monstrfolk for reporting the issue and providing the patch.