manual merge of pull request 312