Fixes from David Parks.