Update to newer types API. Fixes GH-17