Fixed bug on fetching data from api - casting