minor fixes accumulated locally