Bugfix for #3840

This fixes issue #3840 and I guess it was a typo before...
Merge pull request #3851 from christianseel/patch-2

Bugfix for #3840