Fix previous cherry-pickings

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