upstream minor fixes