bugfixes for new API