the data is returned to the page in raw json instead of empty array