Updated pickle for new api.