api controller fix