Fix API initialization on demand