Fixes for persistence