First part of a fix for #208.

I would like to get this under test.