Fix regression from issue 3312
Merge pull request #3384 from Snuffleupagus/regression-3312

Fix regression from issue 3312