fixes suggested by jeremy