fixes from @crbates review