fixing register_api return