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

revert patch from PR #1074