fixed api hanging