bug 2740 added fix
Merge pull request #2730 from StevenPuttemans:bug_2740