Manual merge of pull request #338