Bug fix for sub api kernel responses and improved api response handling