Not sure. @gadamc might know as this code is ported from one of his branches.