Possible fix for issue #42

Pure speculation, needs testing.