fix bugs in api access