Fixes from Robert Gill