Issue 304

This fixes #304.

Can I get a review on this?  I plan to release 2.14.2 with these fixes once this gets merged, then I'll port this to 2.99 and master.