Merge pull request #535 from z16/4.1

Adjustment for API changes