fixes from Victor Goff