Fix for #42

This fixes issue #42.