Fix the return format of API responses