fixed api reporting in khs error when compiling