Fixes issue #101 (at least the part we think is fixable).