Fixes #5100
Actually fixes #5100
Merge pull request #5101 from Zuhayr/master

Fixes #5100