Fixes Issue #5927

This pull request fixes Issue #5927