Fix branch to 3.1 compatibility
Merge pull request #14 from tractorcow/pulls/3.1-api

Fix branch to 3.1 compatibility