Fix problems with ApiContoller