Fixed bug in report #3346
Merge pull request #1853 from StevenPuttemans:bugfix_3346