Fixed multi-threaded usage of API-keys.