Fixing issue #47

This should fix #47