Properly updating map on api response