Adapted to the latest library changed.