Merge pull-request #103 (cherry-picked).