fix issue #3215

Proposed fix for issue #3215