Fixed the API to return response