Bugfix for API changes