Fixes #131 Removed use of deprecated API.