Fix compile errors in the persistence module