Issue in getting responses from API