Fixed a bug, that crashed the API