merged v4.07 of upstream