manual apply of pull request #30