Fix for issue #236
Merge pull request #2548 from eliangidoni/fix-236

Fix for issue #236 by @eliangidoni