bug fix: issue #760 - duplicate code