3.1 compatibility
Merge pull request #8 from wilr/compatibility31

3.1 compatibility