fix bug 3252
Merge pull request #2729 from StevenPuttemans:bug_3252