fix persistence layer