fix bug in api __init__