[upstream] Some minor fixes.