IOC locals fixes. Thanks to Thomas Jack for the patch