fix api call

the wrong api function is called