Merge pull request #535 from z16/4.1

Adjustment for API changes
Merge pull request #21 from Windower/4.1

Merge pull request #535 from z16/4.1