Bugfix, adapted to current API specification