Fix problem which happenens when there are no credentials for API usage