Bugfix for API