Bugfix to API and Dataretriever