reverted pull request #2671 for issue #2670