Resubmitting PR #157 in 2.1 branch
Merge pull request #158 from Ascarius/2.1

Resubmitting PR #157 in 2.1 branch