tentative pull request for #271

Only the commit for #271 should be included in this pull request, as the other changes are result of `git fetch upstream` cmd.