set api call finished state earlier