fixes suggested by Erik