Fixes issue #39

This fixes issue #39