a few minor fixes suggested by Graham