fix issue when response is not array