merged latest upstream#master