Fixing bug related to #2701
Merge pull request #2724 from permcody/bug_fix_2701

Fixing bug related to #2701
Merge commit 'df439e6a99b5e50ef408a54f370990f78fd2e0e5'