Fix function persist