Adapted to the latest changes.