Bugfix for #3840

This fixes issue #3840 and I guess it was a typo before...