Merge improvements by alexandre-mbm