fixed api handler