Fix some API issues; fixes #9