API fixes #1

please read the commit messages