changes copied from PR#256

Another try to see if the correct branch shows up.

See #256 (and discussion at #312)