Make persist function synchronous

It was asynchronous, which did not fulfill the interface contract.