revert patch from PR 1074, since it break capturing on MacOSX