fixed api concurrency issues