Fix exception on pickle load