For some reason, I failed to merge the patch from jpmens for this file. Applying manually