Fix previous cherry-pickings (again)

Signed-off-by: Jerome Flesch <jflesch@gmail.com>