fixes suggested by chandra