Minor API bugfixes