Fix issue 3728
Merge pull request #2001 from thisch/fix_3728

Issue 3728